public class Dog {
    public static void main(String[] args) {
        Dog dog = new Dog();// 创建一个对象
        dog.call();
        dog.eat();// 调用行为
        // 给对象属性赋值
        dog.color = "黄色";
        dog.age = 3;
        dog.weight = 20;
        System.out.println(dog.color);
    }

    public String color;
    public int age;
    public float weight;

    // 吃 实例方法
    public void eat() {
        System.out.println("狗吃狗粮");
    }

    // 叫
    public void call() {
        System.out.println("犬吠");
    }
}
